<template>
	<view>
		<view class="top">
			<view class="top_input">
				<input type="text" value="" placeholder="分享你的商品吧..."
					style="width: 98%;margin-left: 2%; height: 40px;border: none;" />
			</view>
			<view class="top_img">
				<uni-file-picker v-model="imageValue" fileMediatype="image" mode="grid" @select="select"
					@progress="progress" @success="success" @fail="fail" />
			</view>
			<view class="top_address">
				上海 奉贤
			</view>
		</view>
		<button @click="toactive()"
			style="width: 60%;height: 35px;margin-left: 20%;border-radius: 30px;border: 1px solid #ccc;line-height: 35px;font-size: 15px;position: fixed;bottom: 10px;">发布</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imageValue: []
			}
		},
		methods: {
			// 获取上传状态
			select(e) {
				console.log('选择文件：', e)
			},
			// 获取上传进度
			progress(e) {
				console.log('上传进度：', e)
			},

			// 上传成功
			success(e) {
				console.log('上传成功')
			},

			// 上传失败
			fail(e) {
				console.log('上传失败：', e)
			},
			toactive() {
				uni.navigateTo({
					url: '../informationActives/informationActives'
				})
			}
		}
	}
</script>

<style scoped>
	.top {
		width: 100%;
		height: 300px;
	}

	.top_input {
		width: 100%;
		height: 100px;
	}

	.top_img {
		width: 98%;
		margin-left: 2%;
		height: 100px;
	}

	.top_address {
		width: 98%;
		margin-left: 2%;
		height: 30px;
		margin-top: 30px;
		line-height: 30px;
		color: #ccc;
		font-size: 12px;
	}
</style>
